]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
slider: Don't preserve paths after filling
authorSebastian Keller <skeller@gnome.org>
Wed, 30 Jul 2025 13:24:29 +0000 (15:24 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 1 Aug 2025 14:29:46 +0000 (16:29 +0200)
Prior to 6fd0aac86 the paths were preserved when filling to allow
stroking the path afterwards. The stroke() then would have cleared the
path. Then when the stroking was dropped in that commit, a second fill()
call, this time without preserving the path was added, but missed from
the end arc of the bar level. This then would leak the path to the
slider handle.

Fix this by always using fill() instead of fillPreserve().

Fixes: 6fd0aac86 ("slider: Remove border drawing code add hover style")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3817>
(cherry picked from commit 95b407b57f6334cc1895d838c0b5fb7c42ff9c16)

js/ui/barLevel.js
js/ui/slider.js

index a0d6d65a54577ababc8871d1b595647240399c95..777cdefe71b0ce61fba7c5067ad30c27a19667f4 100644 (file)
@@ -208,7 +208,7 @@ export const BarLevel = GObject.registerClass({
                 cr.lineTo(Math.ceil(endX), (height - this._barLevelHeight) / 2);
             }
             cr.lineTo(endX, (height - this._barLevelHeight) / 2);
-            cr.fillPreserve();
+            cr.fill();
         }
 
         /* draw overdrive separator */
index 3a2cdbd8f14ec8bbcf11ba3fc73f9eb7eeec9ee7..6b09b4c40381bcfd79edfafe2f8f3303fef762ef 100644 (file)
@@ -59,7 +59,7 @@ export const Slider = GObject.registerClass({
         let color = themeNode.get_foreground_color();
         cr.setSourceColor(color);
         cr.arc(handleX, handleY, this._handleRadius, 0, 2 * Math.PI);
-        cr.fillPreserve();
+        cr.fill();
         cr.$dispose();
     }